﻿@{
    Layout = null;
}

@model StudentManagement.ViewModels.LoginViewModel

<!DOCTYPE html>
<html>
<head>
    <title>系统登录</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

    <link href="~/libs/twitter-bootstrap/css/bootstrap.css" rel="stylesheet" />
    <!-- Font Awesome Icons -->
    <link href="~/libs/adminlte/plugins/fontawesome-free/css/all.css" rel="stylesheet" />
    <!-- Theme style -->
    <link href="~/libs/adminlte/dist/css/adminlte.css" rel="stylesheet" />
    <link href="~/libs/ionicons-2.0.1/css/ionicons.css" rel="stylesheet" />
    <link href="~/libs/icheck-bootstrap/icheck-bootstrap.css" rel="stylesheet" />
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
    <link href="~/libs/iCheck/skins/square/blue.css" rel="stylesheet" />

</head>
<body class="hold-transition login-page">

    <div class="login-box">
        <div class="login-logo">
            学生信息管理系统
        </div>
        <!-- /.login-logo -->
        <div class="login-box-body">

            <input id="errorInfo" type="hidden" value="@ViewBag.ErrorInfo" />

            <form asp-controller="Account" asp-action="login" method="post">
                <div class="form-group has-feedback">
                    <input asp-for="UserName" type="text" value="@Model.UserName" class="form-control" placeholder="用户名">
                    <span class="glyphicon glyphicon-user form-control-feedback"></span>
                    @*<span asp-validation-for="UserName" class="text-danger"></span>*@
                </div>
                <div class="form-group has-feedback">
                    <input asp-for="Password" type="Password" value="@Model.Password" class="form-control" placeholder="密码">
                    <span class="glyphicon glyphicon-lock form-control-feedback"></span>
                </div>
                <div class="form-group">
                    <div class="col-xs-4">
                        <button id="btnLogin" type="submit" class="btn btn-success btn-block btn-flat">登录</button>
                    </div>
                </div>
                <div class="row">
                    <div class="checkbox icheck">
                        <input type="checkbox" asp-for="@Model.RememberMe">记住我
                    </div>
                </div>               
                <div class="row">
                    <a class="btn btn-link" href="#">忘记密码</a><br>
                    <a class="btn btn-link" href="#">注册</a>
                </div>
            </form>
        </div>
        <!-- /.login-box-body -->
    </div>


    <!-- /.login-box -->
    <!-- jQuery 3 -->
    <script src="~/libs/jquery/jquery.js"></script>
    <script src="~/libs/twitter-bootstrap/js/bootstrap.js"></script>
    <script src="~/libs/layer/layer.js"></script>
    <!-- iCheck -->
    <script src="~/libs/iCheck/icheck.js"></script>

    <script>
        $(function () {
            $('input').iCheck({
                checkboxClass: 'icheckbox_square-blue',
                radioClass: 'iradio_square-blue',
                increaseArea: '20%' /* optional */
            });

            //显示服务端验证的错误信息
            if ($("#errorInfo").val()) {
                layer.tips($("#errorInfo").val(), "#btnLogin", { tips: [2, '#D2691E'] }); // 巧克力色
            };
        });
    </script>
</body>
</html>